<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8" />
		<title>demo</title>
	</head>
	<body>
		<script type="text/javascript" >

			let arr = [1,3,5,7]

			//第一步：讲Array.prototype.push保存一份
			const originPush = Array.prototype.push

			//第二步：对于Array.prototype.push做增强
			Array.prototype.push = function(value){
				value += 1
				// console.log('Array.prototype.push调用了！',value,this)
				//将value放入arr中 —— 调用原始的push去完成
				return originPush.call(this,value)
			}

			let reuslt = arr.push(9)
			console.log(arr)
			console.log(reuslt)


		</script>
	</body>
</html>